package com.bestv.search.common.service;

import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.BizType;
import com.bestv.search.common.model.KeySubject;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface KeySubjectManager {

    public KeySubject getByTypeName(DataSourceKey key, String type, String name);

    public KeySubject getById(DataSourceKey key, Long id);

    public KeySubject saveKeySubject(DataSourceKey key, KeySubject ks, BizType bizType);

    public List<KeySubject> getKeySubjects(DataSourceKey key, int start, int limit);

    public Map<String, Integer> findKeyFrequent(DataSourceKey key, String[] keys);

    public Object deleteKeySubjectById(DataSourceKey key, Long id);

    public int getKeySubjectCount(DataSourceKey key);

    List<KeySubject> getKeySubjectsByUpdateTimeForIndex(DataSourceKey key, Date updateTimeForIndex);

    List<KeySubject> getOnLineKeySubjects(DataSourceKey key, int start, int limit);

    int getOnLineKeySubjectsCount(DataSourceKey key);

}
